package fcl.platform;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;

public class BootUpReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context ctx, Intent arg1) {
		SharedPreferences settings = ctx.getSharedPreferences(ctx.getString(R.string.pref_name), 0);
		boolean auto_start = settings.getBoolean(ctx.getString(R.string.auto_start_key), false);
		if(auto_start) {
			ctx.startService(new Intent(ctx.getString(R.string.remote_service)));
		}
	}
}